﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace weighing
{
    public class OtherConfig
    {
        public static OtherConfig Default
        {
            get
            {
                return new OtherConfig
                {
                    StreamType = 1,
                    IcCom = "COM1",
                    IcBaudRate = 9600,
                    IcReaderBrand = ICReaderBrandType.UnKnown,
                    IsDevisiveMaterialQueue = false,
                    MaxUsageMemory = 1024,
                    AutoRestartInterval = 120,
                    AutoRestartTime = 3,
                    SimpleWeighingUiFontSize = 14
                };
            }
        }

        /// <summary>
        /// 摄像头码流  0-主码流，1-子码流，2-码流3，3-码流4
        /// </summary>        
        public int StreamType { get; set; }

        public string IcCom { get; set; }
        public int IcBaudRate { get; set; }
        public ICReaderBrandType IcReaderBrand { get; set; }

        /// <summary>
        /// 是否区分物料排队
        /// </summary>
        public bool IsDevisiveMaterialQueue { get; set; }

        /// <summary>
        /// 最大使用内存 1024Mb
        /// </summary>
        public int MaxUsageMemory { get; set; }

        /// <summary>
        /// 启动自动重启 default false
        /// </summary>
        public bool EnableAutoRestart { get; set; } =false;

        /// <summary>
        ///自动重启时间 120s
        /// </summary>
        public int AutoRestartInterval { get; set; } = 120;


        /// <summary>
        ///自动重启时间 默认 零晨3点
        /// </summary>
        public int AutoRestartTime { get; set; }

        public int SimpleWeighingUiFontSize { get; set; } = 14;
    }
}
